package com.gxa.luckin.order.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * @author: XHZ
 * @date: 15:09 2021/7/16
 */
@Entity
@Table(name = "luckin_order")
@Data
public class Order implements Serializable {
    @Id
    @Column(name = "order_id")
    private String orderId;

    /**
     * 付款金额。单位:分。如:20007，表示:200元7分
     */
    @Column(name = "pay_amount")
    private Long payAmount;

    /**
     * 订单创建时间
     */
    @Column(name = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 用户id
     */
    @Column(name = "user_id")
    private Long userId;

    /**
     * 门店id
     */
    @Column(name = "shop_id")
    private Integer shopId;

    /**
     * 门店名称
     */
    @Column(name = "shop_name")
    private String shopName;

    /**
     * 门店地址
     */
    @Column(name = "shop_address")
    private String shopAddress;

}
